from . import __version__ as app_version

app_name = "mes_quality_report"
app_title = "MES Quality Report"
app_publisher = "Your Company"
app_description = "MES质量检测报表"
app_icon = "octicon octicon-file-directory"
app_color = "grey"
app_email = "your-email@example.com"
app_license = "MIT"

# 关键修复：确保报表正确显示在生产模块下
reports = [
    {
        "doctype": "Work Order",
        "name": "MES Quality Inspection Data Report",
        "report_name": "MES质量检测数据报表", 
        "is_standard": "Yes",
        "module": "Manufacturing"  # 使用已存在的Manufacturing模块
    }
]

# 基础JS和CSS文件
app_include_js = [
    "/assets/mes_quality_report/js/mes_quality_report.js"
]

app_include_css = [
    "/assets/mes_quality_report/css/mes_quality_report.css"
]

# 添加DocType JS
doctype_js = {
    "Work Order": "public/js/work_order.js"
}

# 添加DocType List JS
doctype_list_js = {
    "Work Order": "public/js/work_order_list.js"
}

# 添加Doc Events
doc_events = {
    "Work Order": {
        "on_submit": "mes_quality_report.events.work_order_submit",
        "on_cancel": "mes_quality_report.events.work_order_cancel",
    }
}
